package io;

import com.sun.corba.se.spi.orbutil.threadpool.NoSuchWorkQueueException;

import java.io.*;
import java.util.Scanner;

/**
 * 在流连接中使用PW
 */
public class PWDemo2 {
    public static void main(String[] args) throws FileNotFoundException {
        FileOutputStream fos=new FileOutputStream("pw2.txt");
        OutputStreamWriter osw=new OutputStreamWriter(fos);
        BufferedWriter bw=new BufferedWriter(osw);
        PrintWriter pw=new PrintWriter(bw);
        Scanner scan=new Scanner(System.in);
        String b=scan.nextLine();

        pw.println(b);
        System.out.println("over");
        pw.close();
    }
}
